<script setup>
   

   import {ref,reactive} from 'vue'

   /**
    * 标签循环显示控制 
    *    v-for
    *      v-for = "单项名称 in 数组名称"
    *      v-for = "(单项名称 , 每次遍历下角标) in 数组名称"
    *    注意: 数据应该是响应式
    */
   

    let stars = ref(['尹恩惠','张娜拉','范冰冰','刘亦菲','高圆圆']);
  
    let removeStar = (index)=>{
        stars.value.splice(index,1);
    }
</script>

<template>
    <div>
      <ul>
          <li v-for="(item,index) in stars">{{item}} &nbsp; <button @click="removeStar(index)">不喜欢了</button></li>
      </ul>
    </div>
</template>

<style scoped>
</style>
